{extend name="layout/common_layout" /}
{block name="body"}
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/vipset/index')}">充值类型管理</a></li>
            <li class=""><a href="{:url('admin/vipset/add')}">添加充值类型</a></li>
            <li class="layui-this">充值类型</li>
        </ul>
        <div class="layui-tab-content" style='min-height:800px;'>
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/vipset/update')}" method="post">
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" value="{$set.name}" required lay-verify="required" placeholder="请输入名称" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">描述</label>
                        <div class="layui-input-block">
                            <input type="text" name="desc" value="{$set.desc}" required lay-verify="required" placeholder="请输入描述信息" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">金额</label>
                        <div class="layui-input-block">
                            <input type="number" name="money" value="{$set.money}" required lay-verify="required" placeholder="请输入金额" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">可用天数</label>
                        <div class="layui-input-block">
                            <input type="number" name="setdays" value="{$set.setdays}" required lay-verify="required" placeholder="请输入可用天数,-1为无限" class="layui-input">
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">代理折扣</label>
                        <div class="layui-input-block">
                            <input type="number" name="agent_money" value="{$set.agent_money}" required lay-verify="required" step="0.01" placeholder="请输入代理折扣，小于1按百分比计算" class="layui-input">
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block">
                            <input type="number" name="order_num" value="{$set.order_num}" placeholder="越大越靠前" class="layui-input">
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="1" title="启用" {if condition="$set.status==1"} checked="checked"{/if}>
                            <input type="radio" name="status" value="0" title="禁用" {if condition="$set.status==0"} checked="checked"{/if}>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$set.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">更新</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
{/block}